package operation.API;

import java.text.SimpleDateFormat;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.Date;

public class demo03 {
    public static void main(String[] args) {
        //三:请用代码实现:获取当前的日期,并把这个日期转换为指定格式的字符串,如 2088-08-08 08:08:08
        LocalDateTime localDateTime=LocalDateTime.now();
        DateTimeFormatter sdf= DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
        String reint=sdf.format(localDateTime);
        System.out.println(reint);


    }
}
